find the maxima and minima of the function